/**
 * Created by PhpStorm.
 * User: 26243
 * Date: 2017/5/4
 * Time: 20:26
 */
<?php
session_start();
header('Content-Type: application/json');
$userid = $_SESSION['loginFlag'];
require_once("../include.php");
$cates = getAllCate();
if (!($cates && is_array($cates))){
    alertMes("不好意思，暂时网站维护中！！！", "http://www.imooc.com");
}
?>
<!DOCTYPE html>
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
<!--<![endif]-->
<head>
    <meta charset="utf-8">
    <title>大大博客网商&苹果专卖</title>
    <meta name="description" content="iDea a Bootstrap-based, Responsive HTML5 Template">
    <meta name="author" content="htmlcoder.me">

    <!-- Mobile Meta -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <!-- Favicon -->
    <link rel="shortcut icon" href="images/favicon.ico">

    <!-- Web Fonts -->



    <!-- Bootstrap core CSS -->
    <link href="bootstrap/css/bootstrap.css" rel="stylesheet">

    <!-- Font Awesome CSS -->
    <link href="fonts/font-awesome/css/font-awesome.css" rel="stylesheet">

    <!-- Fontello CSS -->
    <link href="fonts/fontello/css/fontello.css" rel="stylesheet">

    <!-- Plugins -->
    <link href="plugins/magnific-popup/magnific-popup.css" rel="stylesheet">
    <link href="css/animations.css" rel="stylesheet">
    <link href="plugins/owl-carousel/owl.carousel.css" rel="stylesheet">

    <!-- iDea core CSS file -->
    <link href="css/style.css" rel="stylesheet">

    <!-- Color Scheme (In order to change the color scheme, replace the red.css with the color scheme that you prefer)-->
    <link href="css/skins/red.css" rel="stylesheet">

    <!-- Custom css -->
    <link href="css/custom.css" rel="stylesheet">
</head>

<!-- body classes:
        "boxed": boxed layout mode e.g. <body class="boxed">
        "pattern-1 ... pattern-9": background patterns for boxed layout mode e.g. <body class="boxed pattern-1">
-->
<body>
<!-- scrollToTop -->
<!-- ================ -->
<div class="scrollToTop"><i class="icon-up-open-big"></i></div>

<!-- page wrapper start -->
<!-- ================ -->
<div class="page-wrapper">

    <!-- header-top start -->
    <!-- ================ -->
    <div class="header-top">
        <div class="container">
            <div class="row">
                <div class="col-xs-2 col-sm-6">

                    <!-- header-top-first start -->
                    <!-- ================ -->
                    <div class="header-top-first clearfix">
                        <ul class="social-links clearfix hidden-xs">
                            <li class="twitter"><a target="_blank" href=""><i class="fa fa-twitter"></i></a></li>
                            <li class="skype"><a target="_blank" href=""><i class="fa fa-skype"></i></a></li>
                            <li class="linkedin"><a target="_blank" href=""><i class="fa fa-linkedin"></i></a></li>
                            <li class="googleplus"><a target="_blank" href=""><i class="fa fa-google-plus"></i></a></li>
                            <li class="youtube"><a target="_blank" href=""><i class="fa fa-youtube-play"></i></a></li>
                            <li class="flickr"><a target="_blank" href=""><i class="fa fa-flickr"></i></a></li>
                            <li class="facebook"><a target="_blank" href=""><i class="fa fa-facebook"></i></a></li>
                            <li class="pinterest"><a target="_blank" href=""><i class="fa fa-pinterest"></i></a></li>
                        </ul>
                        <div class="social-links hidden-lg hidden-md hidden-sm">
                            <div class="btn-group dropdown">
                                <button type="button" class="btn dropdown-toggle" data-toggle="dropdown"><i class="fa fa-share-alt"></i></button>
                                <ul class="dropdown-menu dropdown-animation">
                                    <li class="twitter"><a target="_blank" href=""><i class="fa fa-twitter"></i></a></li>
                                    <li class="skype"><a target="_blank" href=""><i class="fa fa-skype"></i></a></li>
                                    <li class="linkedin"><a target="_blank" href=""><i class="fa fa-linkedin"></i></a></li>
                                    <li class="googleplus"><a target="_blank" href=""><i class="fa fa-google-plus"></i></a></li>
                                    <li class="youtube"><a target="_blank" href=""><i class="fa fa-youtube-play"></i></a></li>
                                    <li class="flickr"><a target="_blank" href=""><i class="fa fa-flickr"></i></a></li>
                                    <li class="facebook"><a target="_blank" href=""><i class="fa fa-facebook"></i></a></li>
                                    <li class="pinterest"><a target="_blank" href=""><i class="fa fa-pinterest"></i></a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <!-- header-top-first end -->

                </div>
                <div class="col-xs-10 col-sm-6">

                    <!-- header-top-second start -->
                    <!-- ================ -->
                    <div id="header-top-second"  class="clearfix">
                        <!-- header top dropdowns start -->
                        <!-- ================ -->
                        <?php if(@$_SESSION['loginFlag']):?>
                        <div class="header-top-dropdown">
                                <div  class="btn-group dropdown">
                                    <button type="button" class="btn dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i><i><?php echo $_SESSION['username'];?></i></button>
                                    <ul  class="dropdown-menu dropdown-menu-right dropdown-animation">
                                        <a href="doAction.php?act=userOut" class="btn btn-danger btn-sm">正常退出</a>
                                        <span>或</span>
                                        <a href="page-404.html" class="btn btn-success btn-sm">修改密码</a>
                                    </ul>
                                </div>
                            <div class="btn-group dropdown">
                                <button type="button" class="btn dropdown-toggle" data-toggle="dropdown"><i class="fa fa-shopping-cart"></i> Cart</button>
                                <ul class="dropdown-menu dropdown-menu-right dropdown-animation cart">
                                    <li>
                                        <table class="table table-hover">
                                            <thead>
                                            <tr>
                                                <th class="quantity">数量</th>
                                                <th class="product">商品描述</th>
                                                <th class="amount">商品价格</th>
                                            </tr>
                                            </thead>
                                            <?php
                                            $sql = "select c.num, p.pName, p.iPrice from imooc_pro p RIGHT JOIN shop_cart c ON p.id=c.productid WHERE c.userid={$userid}";
                                            $rows= fetchAll($sql);
                                            //var_dump($rows);
                                            if ($rows && is_array($rows)):
                                            foreach ($rows as $cartsimple):
                                            ?>
                                            <tbody>
                                            <tr>
                                                <td class="quantity"><?php echo $cartsimple['num'];?></td>
                                                <td class="product"><a href="shop-product.html"><?php echo $cartsimple['pName'];?></a></td>
                                                <td class="amount"><?php echo $cartsimple['iPrice'];?></td>
                                            </tr>
                                            </tbody>
                                            <?php
                                            endforeach;
                                            endif;
                                            ?>
                                        </table>
                                        <div class="panel-body text-right">
                                            <a href="index.php" class="btn btn-group btn-default btn-sm">刷新您的购物车</a>
                                            <a href="shop_cart.php" class="btn btn-group btn-default btn-sm">购物车详情</a>
                                            <a href="shop_checkout.php" class="btn btn-group btn-default btn-sm">提交订单</a>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                        </div>

                        <?php else:?>

                        <div  class="header-top-dropdown">
                            <div  class="btn-group dropdown">
                                <button type="button" class="btn dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i>登录</button>
                                <ul  class="dropdown-menu dropdown-menu-right dropdown-animation">
                                    <li >
                                        <form class="login-form" method="post" action="doAction.php?act=login">
                                            <div class="form-group has-feedback">
                                                <label class="control-label">用户名</label>
                                                <input type="text" class="form-control" placeholder="注册时填写的邮箱" name="username">
                                                <i class="fa fa-user form-control-feedback"></i>
                                            </div>
                                            <div class="form-group has-feedback">
                                                <label class="control-label">密码</label>
                                                <input type="password" class="form-control" placeholder="" name="password">
                                                <i class="fa fa-lock form-control-feedback"></i>
                                            </div>
                                            <button type="submit" class="btn btn-group btn-dark btn-sm">登录</button>
                                            <span>或</span>
                                            <a href="zc.php" class="btn btn-success btn-sm">注册</a>
                                            <ul>
                                                <li><a href="page-404.html">忘记密码了？</a></li>
                                            </ul>
                                            <div class="divider"></div>
                                            <span class="text-center">其他登录方式</span>
                                            <ul class="social-links clearfix">
                                                <li class="facebook"><a target="_blank" href=""><i class="fa fa-qq"></i></a></li>
                                                <li class="twitter"><a target="_blank" href=""><i class="fa fa-weibo"></i></a></li>
                                                <li class="googleplus"><a target="_blank" href=""><i class="fa fa-wechat"></i></a></li>
                                            </ul>
                                        </form>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <?php endif;?>
                        <!--  header top dropdowns end -->

                    </div>
                    <!-- header-top-second end -->

                </div>
            </div>
        </div>
    </div>
    <!-- header-top end -->

    <!-- header start (remove fixed class from header in order to disable fixed navigation mode) -->
    <!-- ================ -->
    <header class="header fixed clearfix">
        <div class="container">
            <div class="row">
                <div class="col-md-3">

                    <!-- header-left start -->
                    <!-- ================ -->
                    <div class="header-left clearfix">

                        <!-- logo -->
                        <div class="logo">
                            <a href="index.html"><img id="logo" src="images/logo_red.png" alt="iDea"></a>
                        </div>

                        <!-- name-and-slogan -->
                        <div class="site-slogan">
                            欢迎访问我的主页！
                        </div>

                    </div>
                    <!-- header-left end -->

                </div>
                <div class="col-md-9">

                    <!-- header-right start -->
                    <!-- ================ -->
                    <div class="header-right clearfix">

                        <!-- main-navigation start -->
                        <!-- ================ -->
                        <div class="main-navigation animated">

                            <!-- navbar start -->
                            <!-- ================ -->
                            <nav class="navbar navbar-default" role="navigation">
                                <div class="container-fluid">

                                    <!-- Toggle get grouped for better mobile display -->
                                    <div class="navbar-header">
                                        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1">
                                            <span class="sr-only">Toggle navigation</span>
                                            <span class="icon-bar"></span>
                                            <span class="icon-bar"></span>
                                            <span class="icon-bar"></span>
                                        </button>
                                    </div>

                                    <!-- Collect the nav links, forms, and other content for toggling -->
                                    <div class="collapse navbar-collapse" id="navbar-collapse-1">
                                        <ul class="nav navbar-nav navbar-right">
                                            <li class="dropdown active">
                                                <a href="index.html" class="dropdown-toggle" data-toggle="dropdown">主页</a>
                                                <ul class="dropdown-menu">
                                                    <li class="active"><a href="index.html">主页</a></li>
                                                    <li><a href="">Home - 2</a></li>
                                                    <li><a href="">Home - 3</a></li>
                                                    <li><a href="">Home - 4</a></li>
                                                    <li><a href="">Home - 5</a></li>
                                                    <li><a href="">Home - 8</a></li>
                                                    <li><a href="">Home - 6</a></li>
                                                    <li><a href="">Home - 7</a></li>
                                                </ul>
                                            </li>
                                            <!-- mega-menu start -->
                                            <li class="dropdown mega-menu">
                                                <a href="" class="dropdown-toggle" data-toggle="dropdown">特殊页面</a>
                                                <ul class="dropdown-menu">
                                                    <li>
                                                        <div class="row">
                                                            <div class="col-lg-4 col-md-3 hidden-sm">
                                                                <h4>文采程序员</h4>
                                                                <p>请取之于蓝而青于蓝，冰水为之而寒于水</p>
                                                                <img src="images/section-image-3.jpg" alt="iDea">
                                                            </div>
                                                            <div class="col-lg-8 col-md-9">
                                                                <h4>我的文章</h4>
                                                                <div class="row">
                                                                    <div class="col-sm-4">
                                                                        <div class="divider"></div>
                                                                        <ul class="menu">
                                                                            <li><a href="blog.html"><i class="icon-right-open"></i>博文</a></li>
                                                                            <li><a href=""><i class="icon-right-open"></i>About Us 2</a></li>
                                                                        </ul>
                                                                    </div>
                                                                    <div class="col-sm-4">
                                                                        <div class="divider"></div>
                                                                        <ul class="menu">
                                                                            <li><a href="page-404.html"><i class="icon-right-open"></i>404页面</a></li>
                                                                            <li><a href=""><i class="icon-right-open"></i>Contact 2</a></li>
                                                                        </ul>
                                                                    </div>
                                                                    <div class="col-sm-4">
                                                                        <div class="divider"></div>
                                                                        <ul class="menu">
                                                                            <li><a href="page-coming-soon.html"><i class="icon-right-open"></i>即将到来页面</a></li>
                                                                            <li><a href=""><i class="icon-right-open"></i>Contact</a></li>
                                                                        </ul>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </li>
                                                </ul>
                                            </li>
                                            <!-- mega-menu end -->
                                            <li class="dropdown active">
                                                <a href="blog.html" class="dropdown-toggle" data-toggle="dropdown">我的文章</a>
                                                <ul class="dropdown-menu">
                                                    <li class="active"><a href="index.html">主页</a></li>
                                                    <li><a href="">Home - 2</a></li>
                                                    <li><a href="">Home - 3</a></li>
                                                    <li><a href="">Home - 4</a></li>
                                                    <li><a href="">Home - 5</a></li>
                                                    <li><a href="">Home - 8</a></li>
                                                    <li><a href="">Home - 6</a></li>
                                                    <li><a href="">Home - 7</a></li>
                                                </ul>
                                            </li>
                                            <li class="dropdown active">
                                                <a href="page-coming-soon.html" class="dropdown-toggle" data-toggle="dropdown">电影</a>
                                                <ul class="dropdown-menu">
                                                    <li class="active"><a href="index.html">主页</a></li>
                                                    <li><a href="">Home - 2</a></li>
                                                    <li><a href="">Home - 3</a></li>
                                                    <li><a href="">Home - 4</a></li>
                                                    <li><a href="">Home - 5</a></li>
                                                    <li><a href="">Home - 8</a></li>
                                                    <li><a href="">Home - 6</a></li>
                                                    <li><a href="">Home - 7</a></li>
                                                </ul>
                                            </li>
                                            <!-- mega-menu end -->
                                            <li class="dropdown active">
                                                <a href="music.html" class="dropdown-toggle" data-toggle="dropdown">音乐</a>
                                                <ul class="dropdown-menu">
                                                    <li class="active"><a href="index.html">主页</a></li>
                                                    <li><a href="">Home - 2</a></li>
                                                    <li><a href="">Home - 3</a></li>
                                                    <li><a href="">Home - 4</a></li>
                                                    <li><a href="">Home - 5</a></li>
                                                    <li><a href="">Home - 8</a></li>
                                                    <li><a href="">Home - 6</a></li>
                                                    <li><a href="">Home - 7</a></li>
                                                </ul>
                                            </li>
                                            <li class="dropdown active">
                                                <a href="page-contact.html" class="dropdown-toggle" data-toggle="dropdown">联系我</a>
                                                <ul class="dropdown-menu">
                                                    <li class="active"><a href="index.html">主页</a></li>
                                                    <li><a href="">Home - 2</a></li>
                                                    <li><a href="">Home - 3</a></li>
                                                    <li><a href="">Home - 4</a></li>
                                                    <li><a href="">Home - 5</a></li>
                                                    <li><a href="">Home - 8</a></li>
                                                    <li><a href="">Home - 6</a></li>
                                                    <li><a href="">Home - 7</a></li>
                                                </ul>
                                            </li>
                                        </ul>
                                    </div>

                                </div>
                            </nav>
                            <!-- navbar end -->

                        </div>
                        <!-- main-navigation end -->

                    </div>
                    <!-- header-right end -->

                </div>
            </div>
        </div>
    </header>
    <!-- header end -->

    <!-- page-intro start-->
    <!-- ================ -->
    <div class="page-intro">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <ol class="breadcrumb">
                        <li><i class="fa fa-home pr-10"></i><a href="index.html">主页</a></li>
                        <li class="active">大大网上商城</li>
                    </ol>
                </div>
            </div>
        </div>
    </div>
    <!-- page-intro end -->

    <!-- main-container start -->
    <!-- ================ -->
    <section class="main-container">

        <div class="container" >
            <div class="row">

                <!-- main start -->
                <!-- ================ -->
                <div class="main col-md-12">
                    <!-- page-title start -->
                    <!-- ================ -->
                    <h1 class="page-title">大大博客网商</h1>
                    <div class="separator-2"></div>
                    <p class="lead">大大郑重承诺一、有空就提供客户服务<br class="hidden-sm hidden-xs"> 大大郑重承诺二、有空就发货</p>
                    <!-- page-title end -->



                    <?php foreach ($cates as $cate):?><div><h3><?php echo $cate['cName'];?></h3></div>
                    <!-- shop items start -->
                    <div class="masonry-grid-fitrows row grid-space-20 clearfix">

                        <?php
                        $pros = getSmallProsById($cate['id']);


                        if ($pros && is_array($pros)):
                            foreach ($pros as $pro):
                                $proImg = getProImgById($pro['id']);
                                ?>
                        <form role="form" action="doAdminAction.php?act=addCate" method="post">
                        <div class="col-md-3 col-sm-6 masonry-grid-item">
                            <div class="listing-item">
                                <div class="overlay-container">
                                    <img src="../image_220/<?php echo $proImg['albumPath'];?>" alt="">
                                    <a href="shopxj.php?id=<?php echo $pro['id'];?>"  class="overlay small">
                                        <i class="fa fa-plus"></i>
                                        <span >详情</span>
                                    </a>
                                </div>
                                <div class="listing-item-body clearfix">
                                    <h3 class="title"><a ><h3><?php echo $pro['pName'];?></a></h3>

                                    <span class="price">￥<?php echo $pro['iPrice'];?>元</span>
                                    <div class="elements-list pull-right">
                                        <a href="#" class="wishlist" title="wishlist"><i class="fa fa-heart-o"></i></a>
                                        <a href="javascript:addCart(<?php echo $pro['id'];?>)"><i class="fa fa-shopping-cart pr-10"></i>加入购物车</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                        </form>
                    <!-- shop items end -->
                                <?php

                            endforeach;
                        endif;
                        ?>
                <!-- main end -->
                    </div>
                     <?php
                            endforeach;
                            ?>
    </section>
    <!-- main-container end -->

    <!-- section start -->
    <!-- ================ -->
    <div class="section gray-bg text-muted footer-top clearfix">
        <div class="container">
            <div class="row">
                <div class="col-md-6">
                    <div class="owl-carousel clients">
                        <div class="client">
                            <a href="#"><img src="images/client-1.png" alt=""></a>
                        </div>
                        <div class="client">
                            <a href="#"><img src="images/client-2.png" alt=""></a>
                        </div>
                        <div class="client">
                            <a href="#"><img src="images/client-3.png" alt=""></a>
                        </div>
                        <div class="client">
                            <a href="#"><img src="images/client-4.png" alt=""></a>
                        </div>
                        <div class="client">
                            <a href="#"><img src="images/client-5.png" alt=""></a>
                        </div>
                        <div class="client">
                            <a href="#"><img src="images/client-6.png" alt=""></a>
                        </div>
                        <div class="client">
                            <a href="#"><img src="images/client-7.png" alt=""></a>
                        </div>
                        <div class="client">
                            <a href="#"><img src="images/client-8.png" alt=""></a>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <blockquote class="inline">
                        <p class="margin-clear">做一个有文采的程序员</p>
                        <footer><cite title="Source Title">白尚林</cite></footer>
                    </blockquote>
                </div>
            </div>
        </div>
    </div>
    <!-- section end -->

    <!-- footer start (Add "light" class to #footer in order to enable light footer) -->
    <!-- ================ -->
    <footer id="footer">

        <!-- .footer start -->
        <!-- ================ -->
        <div class="footer">
            <div class="container">
                <div class="row">
                    <div class="col-md-6">
                        <div class="footer-content">
                            <div class="logo-footer"><img id="logo-footer" src="images/logo_red_footer.png" alt=""></div>
                            <div class="row">
                                <div class="col-sm-6">
                                    <p>这是一个很厚的footer</p>
                                    <ul class="social-links circle">
                                        <li class="twitter"><a target="_blank" href=""><i class="fa fa-qq"></i></a></li>
                                        <li class="skype"><a target="_blank" href=""><i class="fa fa-weibo"></i></a></li>
                                        <li class="linkedin"><a target="_blank" href=""><i class="fa fa-wechat"></i></a></li>
                                        <li class="googleplus"><a target="_blank" href=""><i class="fa fa-android"></i></a></li>
                                        <li class="youtube"><a target="_blank" href=""><i class="fa fa-html5"></i></a></li>
                                    </ul>
                                </div>
                                <div class="col-sm-6">
                                    <ul class="list-icons">
                                        <li><i class="fa fa-map-marker pr-10"></i> 天俺们</li>
                                        <li><i class="fa fa-phone pr-10"></i> +00 1234567890</li>
                                        <li><i class="fa fa-fax pr-10"></i> +00 1234567891 </li>
                                        <li><i class="fa fa-envelope-o pr-10"></i> info@idea.com</li>
                                    </ul>
                                </div>
                            </div>
                            <a href="page-about.html" class="link"><span>链接字</span></a>
                        </div>
                    </div>
                    <div class="space-bottom hidden-lg hidden-xs"></div>
                    <div class="col-sm-6 col-md-2">
                        <div class="footer-content">
                            <h2>主页</h2>
                            <nav>
                                <ul class="nav nav-pills nav-stacked">
                                    <li><a href="index.html">主页</a></li>
                                    <li class="active"><a href="blog-right-sidebar.html">xxx</a></li>
                                    <li><a href="portfolio-3col.html">xxxx</a></li>
                                    <li><a href="page-about.html">About</a></li>
                                    <li><a href="page-contact.html">xxxx</a></li>
                                </ul>
                            </nav>
                        </div>
                    </div>
                    <div class="col-sm-6 col-md-3 col-md-offset-1">
                        <div class="footer-content">
                            <h2>9图链接</h2>
                            <div class="gallery row">
                                <div class="gallery-item col-xs-4">
                                    <div class="overlay-container">
                                        <img src="images/gallery-1.jpg" alt="">
                                        <a href="portfolio-item.html" class="overlay small">
                                            <i class="fa fa-link"></i>
                                        </a>
                                    </div>
                                </div>
                                <div class="gallery-item col-xs-4">
                                    <div class="overlay-container">
                                        <img src="images/gallery-2.jpg" alt="">
                                        <a href="portfolio-item.html" class="overlay small">
                                            <i class="fa fa-link"></i>
                                        </a>
                                    </div>
                                </div>
                                <div class="gallery-item col-xs-4">
                                    <div class="overlay-container">
                                        <img src="images/gallery-3.jpg" alt="">
                                        <a href="portfolio-item.html" class="overlay small">
                                            <i class="fa fa-link"></i>
                                        </a>
                                    </div>
                                </div>
                                <div class="gallery-item col-xs-4">
                                    <div class="overlay-container">
                                        <img src="images/gallery-4.jpg" alt="">
                                        <a href="portfolio-item.html" class="overlay small">
                                            <i class="fa fa-link"></i>
                                        </a>
                                    </div>
                                </div>
                                <div class="gallery-item col-xs-4">
                                    <div class="overlay-container">
                                        <img src="images/gallery-5.jpg" alt="">
                                        <a href="portfolio-item.html" class="overlay small">
                                            <i class="fa fa-link"></i>
                                        </a>
                                    </div>
                                </div>
                                <div class="gallery-item col-xs-4">
                                    <div class="overlay-container">
                                        <img src="images/gallery-6.jpg" alt="">
                                        <a href="portfolio-item.html" class="overlay small">
                                            <i class="fa fa-link"></i>
                                        </a>
                                    </div>
                                </div>
                                <div class="gallery-item col-xs-4">
                                    <div class="overlay-container">
                                        <img src="images/gallery-7.jpg" alt="">
                                        <a href="portfolio-item.html" class="overlay small">
                                            <i class="fa fa-link"></i>
                                        </a>
                                    </div>
                                </div>
                                <div class="gallery-item col-xs-4">
                                    <div class="overlay-container">
                                        <img src="images/gallery-8.jpg" alt="">
                                        <a href="portfolio-item.html" class="overlay small">
                                            <i class="fa fa-link"></i>
                                        </a>
                                    </div>
                                </div>
                                <div class="gallery-item col-xs-4">
                                    <div class="overlay-container">
                                        <img src="images/gallery-9.jpg" alt="">
                                        <a href="portfolio-item.html" class="overlay small">
                                            <i class="fa fa-link"></i>
                                        </a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="space-bottom hidden-lg hidden-xs"></div>
            </div>
        </div>
        <!-- .footer end -->

        <!-- .subfooter start -->
        <!-- ================ -->
        <div class="subfooter">
            <div class="container">
                <div class="row">
                    <div class="col-md-6">
                        <p>Copyright &copy; 2017.Company name All rights reserved.</p>
                    </div>
                    <div class="col-md-6">
                        <nav class="navbar navbar-default" role="navigation">
                            <!-- Toggle get grouped for better mobile display -->
                            <div class="navbar-header">
                                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-2">
                                    <span class="sr-only">Toggle navigation</span>
                                    <span class="icon-bar"></span>
                                    <span class="icon-bar"></span>
                                    <span class="icon-bar"></span>
                                </button>
                            </div>
                            <div class="collapse navbar-collapse" id="navbar-collapse-2">
                                <ul class="nav navbar-nav">
                                    <li><a href="index.html">Home</a></li>
                                    <li><a href="page-about.html">About</a></li>
                                    <li><a href="blog-right-sidebar.html">Blog</a></li>
                                    <li><a href="portfolio-3col.html">Portfolio</a></li>
                                    <li><a href="page-contact.html">Contact</a></li>
                                </ul>
                            </div>
                        </nav>
                    </div>
                </div>
            </div>
        </div>
        <!-- .subfooter end -->

    </footer>
    <!-- footer end -->

</div>
<!-- page-wrapper end -->
<script type="text/javascript">
    function addCart(productid) {
        var url="addCart.php";
        var v = 1;//
        var data={"productid":productid,"num": v};
        var success = function (response) {
            if(response.errno == 0){
                alert('加入购物车成功')
            }else {
                alert('加入购物车失败,请登录添加')
            }

        }
        $.post(url,data,success,"json");

        //alert(productid);
    }
</script>
<!-- JavaScript files placed at the end of the document so the pages load faster
================================================== -->
<!-- Jquery and Bootstap core js files -->
<script type="text/javascript" src="plugins/jquery.min.js"></script>
<script type="text/javascript" src="bootstrap/js/bootstrap.min.js"></script>

<!-- Modernizr javascript -->
<script type="text/javascript" src="plugins/modernizr.js"></script>

<!-- Isotope javascript -->
<script type="text/javascript" src="plugins/isotope/isotope.pkgd.min.js"></script>

<!-- Owl carousel javascript -->
<script type="text/javascript" src="plugins/owl-carousel/owl.carousel.js"></script>

<!-- Magnific Popup javascript -->
<script type="text/javascript" src="plugins/magnific-popup/jquery.magnific-popup.min.js"></script>

<!-- Appear javascript -->
<script type="text/javascript" src="plugins/jquery.appear.js"></script>

<!-- Count To javascript -->
<script type="text/javascript" src="plugins/jquery.countTo.js"></script>

<!-- Parallax javascript -->
<script src="plugins/jquery.parallax-1.1.3.js"></script>

<!-- Contact form -->
<script src="plugins/jquery.validate.js"></script>

<!-- Initialization of Plugins -->
<script type="text/javascript" src="js/template.js"></script>

<!-- Custom Scripts -->
<script type="text/javascript" src="js/custom.js"></script>

</body>
</html>